home *** CD-ROM | disk | FTP | other *** search
- Subject: Re: Offscreen drawing
- Sent: 4/8/96 9:30 PM
- Received: 4/9/96 7:02 AM
- From: Hutchings Software Development, hsd@earthlink.net
- Reply-To: ODF-Interest@CILabs.ORG
- To: OpenDoc Development Framework Discussion List, ODF-Interest@CILabs.
-
- > void CFrame::Draw (Environment* ev, ODFacet* odFacet, ODShape*
- > invalidShape)
- > {
- > FW_CRect bounds (FW_kZeroPoint, GetSize(ev));
- > FW_CPoint size = bounds.Size();
- > FW_CBitmap bitmap (size.IntX(), size.IntY(), 0); // 0 -> best
- pixel
- > depth
- > {
- > FW_CBitmapContext bc (ev, bitmap);
- > FW_CRectShape::RenderRect (bc, bounds, FW_kFill,
- > FW_kWhiteEraseInk);
- > // do drawing here
- > }
- >
- >
- > // draw the bitmap
- > FW_CViewContext vc (ev, this);
- > FW_CBitmapShape::RenderBitmap (vc, bitmap, bounds);
- > }
- >
- >
- > This allocates/draws/frees the bitmap on every pass through the draw
- > method. You could easily make the bitmap be an instance of your view
- class
- > or something similary (even, with a little care, fork a thread to draw in
- > it for a period of time).
- >
- >
- > markl
- >
-
- OK, but then, as Steve asked this morning, how do I then make the embedded
- frames draw in the offscreen bitmap. Also, is there a facility in ODF 1.0
- to copy the bitmap over using it's non-white pixels as the mask? In d11,
- the CopyBits call in Rasterizer::RenderBitmap passses NULL for mask, and
- none of the copy modes do what I want.
-
- Brad
-
-
-
- Richard B. "Brad" Hutchings
- General Partner,
- Hutchings Software Development
-
- hsd@earthlink.net
-